package com.jwmp.core.util;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description TODO
 * @Version 1.0
 */
public class QueryObjectUtil {
    public static QueryObject req2qo(HttpServletRequest req){
        QueryObject qo = new QueryObject();
        String strCurrentPage = req.getParameter("currentPage");
        if (StringUtil.hasLength(strCurrentPage)) {
            qo.setCurrentPage(Integer.valueOf(strCurrentPage));
        }

        String strPageSize = req.getParameter("pageSize");
        if (StringUtil.hasLength(strPageSize)) {
            qo.setPageSize(Integer.valueOf(strPageSize));
        }
        return qo;
    }
}
